package com.ineatconseil.yougo.client.ui.main.application.header;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.Place;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.ineatconseil.yougo.client.ui.common.ClientFactory;

/**
 * @author Benjamin Barbier - Ineat Conseil
 */
public class HeaderActivity extends AbstractActivity  implements IHeaderView.Presenter {

	private final ClientFactory clientFactory;
	
	public HeaderActivity(ClientFactory clientFactory) {
		System.out.println("HeaderActivity - constructor");
		this.clientFactory = clientFactory;
	}
	
	@Override
	public void start(AcceptsOneWidget panel, EventBus eventBus) {
		System.out.println("HeaderActivity.start()");
	}

	@Override
	public void goTo(Place place) {
		System.out.println("HeaderActivity.goTo()");
		clientFactory.getPlaceController().goTo(place);
	}

}
